import { http } from '@/utils/http/axios';

/**
 * @description: 
 */
export function listWorker(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/system/listWorker',
    method: 'GET',
    params:params,
  });
}

/**
 * @description: 
 */
export function overview(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/system/overview',
    method: 'GET',
    params:params,
  });
}

/**
 * @description: 应用登录
 */
export function appLogin(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/appInfo/assert',
    method: 'POST',
    data:params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 任务列表
 */
export function jobList(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/job/list',
    method: 'POST',
    data:params,
  });
}


/**
 * @description: 修改任务状态
 */
export function updateJobEnable(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/job/disable',
    method: 'GET',
    params:params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 保存任务
 */
export function saveJob(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/job/save',
    method: 'POST',
    data:params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 运行任务
 */
export function jobRun(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/job/run',
    method: 'GET',
    params:params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 删除任务
 */
export function removeJob(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/job/delete',
    method: 'GET',
    params:params,
  }, {
    isTransformResponse: false,
  });
}
/**
 * @description: 实例列表
 */
export function instanceList(params) {
  return http.request({
    url: '/moss-cloud-job/moss-job-admin/instance/list',
    method: 'POST',
    data:params,
  });
}
